<!-- $Id: agency_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- 搜索 -->
<div class="form-div">
    <form action="javascript:search_agency()" name="searchForm">
        <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" /> 
		{$lang.record_id}<input name="agency_id" type="text" id="agency_id" size="15">
        {$lang.agency_name}<input name="agency_name" type="text" id="agency_name" size="15">
        {$lang.area}
		<select name="regions">
			<option value="0">{$lang.select_please}{$name_of_region[3]}</option>
			<!-- {foreach from=$district_list item=district} -->
			<option value="{$district.region_id}">{$district.region_name}</option>
			<!-- {/foreach} -->
		</select>
        <input type="submit" value="{$lang.button_search}" class="button" />
    </form>
</div>
<form method="post" action="" name="listForm" onsubmit="return confirm(batch_drop_confirm);">
    <div class="list-div" id="listDiv"> {/if}
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th> <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
                    <a href="javascript:listTable.sort('agency_id'); ">{$lang.record_id}</a>{$sort_agency_id} </th>
                <th><a href="javascript:listTable.sort('agency_name'); ">{$lang.agency_name}</a>{$sort_agency_name}</th>
                <th>{$lang.agency_desc}</th>
                <th>{$lang.handler}</th>
            </tr>
            {foreach from=$agency_list item=agency}
            <tr>
                <td><input type="checkbox" name="checkboxes[]" value="{$agency.agency_id}" />
                    {$agency.agency_id}</td>
                <td class="first-cell"><span onclick="javascript:listTable.edit(this, 'edit_agency_name', {$agency.agency_id})">{$agency.agency_name|escape:html} </span></td>
                <td>{$agency.agency_desc|nl2br}</td>
                <td align="center"><a href="agency.php?act=edit&id={$agency.agency_id}" title="{$lang.edit}">{$lang.edit}</a> | <a href="javascript:;" onclick="listTable.remove({$agency.agency_id}, '{$lang.drop_confirm}')" title="{$lang.remove}">{$lang.remove}</a></td>
            </tr>
            {foreachelse}
            <tr>
                <td class="no-records" colspan="4">{$lang.no_records}</td>
            </tr>
            {/foreach}
        </table>
        <table id="page-table" cellspacing="0">
            <tr>
                <td><input name="remove" type="submit" id="btnSubmit" value="{$lang.drop}" class="button" disabled="true" />
                    <input name="act" type="hidden" value="batch" /></td>
                <td align="right" nowrap="true"> {include file="page.htm"} </td>
            </tr>
        </table>
        {if $full_page} </div>
</form>
<script type="text/javascript" language="javascript">
<!--
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};

{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}

{literal}
onload = function()
{
  // 开始检查订单
	startCheckOrder();
}
/**
 * 搜索订单
 */
function search_agency()
{
	listTable.filter['agency_id'] = Utils.trim(document.forms['searchForm'].elements['agency_id'].value);
	listTable.filter['agency_name'] = Utils.trim(document.forms['searchForm'].elements['agency_name'].value);
	listTable.filter['regions'] = document.forms['searchForm'].elements['regions'].value;
	listTable.filter['page'] = 1;
	listTable.loadList();
}
{/literal}
//-->
</script>
{include file="pagefooter.htm"}
{/if}